/*
 * Initialize.h
 *
 *  Created on: Jan 25, 2012
 *      Author: Geerten
 */

#ifndef INITIALIZE_H_
#define INITIALIZE_H_

#include <iostream>
#include <stdio.h>
#include <FiducialDetector.h>
#include <pcrctransformation/pcrctransformer.hpp>
#include <pcrctransformation/point2f.hpp>

#include <Crate.h>

#include "tinyxml.h"

#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/core/core.hpp>
#include <unicap_cv_bridge.hpp>
#include <CameraCalibration/RectifyImage.h>

using namespace unicap_cv_bridge;
using namespace std;
using namespace cv;
using namespace pcrctransformation;

class Initialize{
public:
	Initialize(unicap_cv_camera*, RectifyImage*, FiducialDetector*);

	void exposure();
	void detections();

	bool fiducials(int, int);



	point2f::point2fvector rc, markers;
private:
	double exposure_value;
	double exposure_diff;
	int goal_value;

	unicap_cv_camera* cam;

	FiducialDetector* fidDetector;

	RectifyImage* rectifier;
	Mat final_crate, final_frame, reference, frameRectified;
};

#endif /* INITIALIZE_H_ */
